<template>
  <div class="doctor-header">
    <!--    顶部搜索框-->
    <div class="search_input">
      <el-input v-model="inputName" placeholder="请输入您要查询的名字" @input="search"></el-input>
    </div>
    <div class="add_button"><el-button class="add" icon="el-icon-edit" @click="addDoctor">新增医生</el-button></div>
  </div>

<!--      <div class="search_input">-->
<!--        <el-input v-model="inputDepartment" placeholder="请输入您要查询的科室"></el-input>-->
<!--      </div>-->

<!--    医生信息列表-->
<!--    <div v-for="(item,index) in doctorDatas" :key="item.doctorId">-->
<!--      <el-row v-for="(item,index) in doctorDatas" :key="item.doctorId" :gutter="20" class="doctor-row">-->
<!--        <el-col :span="4" v-for="(o, index) in 1" :key="o" :offset="index > 0 ? 2 : 0">-->
<!--          <el-card :body-style="{ padding: '10px' }">-->
<!--            <img :src="item.doctorPhoto" class="image">-->
<!--            <div style="padding: 10px;">-->
<!--              <span :content="item.doctorName">{{item.doctorName}}</span><br>-->
<!--              <span :content="item.doctorDepartment" style="font-size: 15px;color: #8e8e8e">{{ item.doctorDepartment }}</span>-->
<!--              <span :content="item.doctorTitle" style="font-size: 15px;color: #8e8e8e">{{item.doctorTitle}}</span>-->
<!--              <div class="bottom clearfix">-->
<!--                <el-button type="primary" icon="el-icon-thumb" size="mini" round>查看</el-button>-->
<!--                <el-button type="danger" icon="el-icon-delete" size="mini" round>删除</el-button>-->
<!--              </div>-->
<!--            </div>-->
<!--          </el-card>-->
<!--        </el-col>-->
<!--      </el-row>-->
<!--    </div>-->

<!--    <el-empty description="未查询到有关信息" v-if="doctorDatas.length==0"></el-empty>-->
<!--    <el-backtop target=".file_list" :visibility-height="200"></el-backtop>-->
</template>

<script>
// import doctorCard from '@/components'
export default {
  name: "DoctorSearch",
  data() {
    return {
      inputName: '',
      inputDepartment: '',
    }
  },
  methods: {
    addDoctor() {
      const str = this.$route.path.split('/')[1]
      this.$store.dispatch("addRecordInfo")
      //指定跳转地址
      this.$router.push({name: `/${str}doctorInfo`, params: {edit: true}})
    },
    search(){
      this.$emit("inputEvent",this.inputName)
    }
  }
}
</script>
